Establish new host interface abstraction model, remove ConsoleService#492
Merged
daviwil merged 5 commits intoPowerShell:masterfrom Jun 5, 2017
Merged
Conversation
This change is a fairly large refactoring of our PSHost implementation to remove the ConsoleService and IConsoleHost types and instead use two different PSHostUserInterface implementations. Here's a detailed breakdown of the changes: - Centralized host UI behavior in EditorServicesPSHostUserInterface abstract class. This class now exposes overridable abstract methods that simplify PSHostUserInterface implementations that will be used with the EditorServicesPSHost. - Removed the ConsoleService class and put its behavior and abstractions into EditorServicesPSHostUserInterface. - Created TerminalPSHostUserInterface for the integrated terminal host experience. - Created ProtocolPSHostUserInterface for the protocol-based host experience. - Removed the concept of a "prompt handler context" because each host implementation will have a single way to deal with input and choice prompts. - Lifted direct management of the console interface out of the LanguageServer and DebugAdapter classes, now managed in the EditorServicesHost. - Disabled the ConsoleServiceTests until we decide how to test for this behavior at the level of the EditorServicesPSHostUserInterface.
Since we've finally removed the last usages of the static Logger class, we can now remove it from the codebase. All logging needs should be served by ILogger instances going forward.
2911688 to
d10c0cc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change is a fairly large refactoring of our PSHost implementation
to remove the ConsoleService and IConsoleHost types and instead use two
different PSHostUserInterface implementations. Here's a detailed
breakdown of the changes:
Centralized host UI behavior in EditorServicesPSHostUserInterface
abstract class. This class now exposes overridable abstract methods
that simplify PSHostUserInterface implementations that will be used
with the EditorServicesPSHost.
Removed the ConsoleService class and put its behavior and abstractions
into EditorServicesPSHostUserInterface.
Created TerminalPSHostUserInterface for the integrated terminal host
experience.
Created ProtocolPSHostUserInterface for the protocol-based host
experience.
Removed the concept of a "prompt handler context" because each host
implementation will have a single way to deal with input and choice
prompts.
Lifted direct management of the console interface out of the
LanguageServer and DebugAdapter classes, now managed in the
EditorServicesHost.
Disabled the ConsoleServiceTests until we decide how to test for
this behavior at the level of the EditorServicesPSHostUserInterface.